
#pragma once


#include <iostream>
#include <string>
#include <sstream>
#include <unistd.h>

extern "C"
{
    #include <libavfilter/avfilter.h>
    #include <libavutil/frame.h>
    #include <libavcodec/avcodec.h>

}

struct SimpleFilter 
{
    AVFilterContext * m_buffer_filter_ctx;
    AVFilterContext * m_sinker_filter_ctx;
    AVFilterGraph   * m_filter_graph;
    AVFrame         * m_input_frame;
    AVFrame         * m_output_frame;
};

int CreateFilter(SimpleFilter * filter_content, AVCodecContext * codec_ctx, const std::string & desc);

int ProcessFrame(SimpleFilter * filter_content);


